<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>05相对定位</title>
  <style>
    .fu{
      background-color: yellow;

    }
    .fu>div{
      width: 100px;
      height: 100px;
    }
    .z1{
      position: relative;
      z-index: 0;
      background-color: red;
    }
    .z2{
      background-color: green;
      position: relative;/*默认static文档流布局*/
      left: 50px;/*参考原来的位置移动，不释放空间，不会脱离文档流，不会令fu失高,不会像margin一样挤开别的元素或者被挤开*/
      top: 50px;
      z-index: 2;
    }
    .z3{
      background-color: blue;
      position: relative;
      z-index: 1;
    }
  </style>
</head>
<body>
<div class="fu">
  <div class="z1"></div>
  <div class="z2"></div>
  <div class="z3"></div>
</div>
</body>
</html>